package com.example.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @ClassName IndexController
 * @Description TODO
 * @Author: XMK
 * @Date: 2020/5/20 11:01
 * @Version: 1.0
 */
@Controller
public class IndexController {
    @Value("${spring.profiles.active}")
    private String active;

    @GetMapping("/index")
    public String index(ModelMap map) {
        map.put("attr1", "testtest");
        System.out.println(active);
        return "index";
    }
}
